<?php

class comment extends Model {
	private $_Comment;
	private $_Writter;
	private $_Date;
	private $_Email;

	public function __construct($arrInitialValues = null){
		$this->setTable('comment');
		$this->setColumnId('comment_id');

		$this->_setDefaultValues($arrInitialValues);
		parent::__construct($arrInitialValues);
	}
	
	private function _setDefaultValues($arrInitialValues = null){
		if (isset($arrInitialValues['comment']) && !empty($arrInitialValues['comment']))
			$this->setComment($arrInitialValues['comment']);
		else 
			$this->setComment('');
			
		if (isset($arrInitialValues['writter_name']) && !empty($arrInitialValues['writter_name']))
			$this->setWritter($arrInitialValues['writter_name']);
		else 
			$this->setWritter('');
			
		if (isset($arrInitialValues['email']) && !empty($arrInitialValues['email']))
			$this->setEmail($arrInitialValues['email']);
		else 
			$this->setEmail('');
			
		if (isset($arrInitialValues['date']) && !empty($arrInitialValues['date']))
			$this->setDate($arrInitialValues['date']);
		else 
			$this->setDate(date());
	}	
	
	
	/**
	 * @return the $_Email
	 */
	public function getEmail() {
		return $this->_Email;
	}

	/**
	 * @param field_type $_Email
	 */
	public function setEmail($_Email) {
		$this->_Email = $_Email;
	}

	/**
	 * @return the $_Comment
	 */
	public function getComment() {
		return $this->_Comment;
	}

	/**
	 * @return the $_Writter
	 */
	public function getWritter() {
		return $this->_Writter;
	}

	/**
	 * @return the $_Date
	 */
	public function getDate() {
		return $this->_Date;
	}

	/**
	 * @param field_type $_Comment
	 */
	public function setComment($_Comment) {
		$this->_Comment = $_Comment;
	}

	/**
	 * @param field_type $_Writter
	 */
	public function setWritter($_Writter) {
		$this->_Writter = $_Writter;
	}

	/**
	 * @param field_type $_Date
	 */
	public function setDate($_Date) {
		$this->_Date = $_Date;
	}
	
}

?>